package org.springblade.modules.repair.vo.statistics.ps;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @Description 保养排期概况VO
 * @Author ysq
 * @Date 2023/6/28
 **/
@Data
public class OverviewVO {

	@ApiModelProperty(value = "已排期电梯数")
	private Long planEleTotal;

	@ApiModelProperty(value = "从未排期电梯数")
	private Long notPlanEleTotal;

	@ApiModelProperty(value = "有剩余排期电梯数")
	private Long featureScheduleEleCount;

	@ApiModelProperty(value = "有剩余排期电梯数占比")
	private BigDecimal featureScheduleElePct;

	@ApiModelProperty(value = "无剩余排期电梯数")
	private Long notFeatureScheduleEleCount;

	@ApiModelProperty(value = "无剩余排期电梯数占比")
	private BigDecimal notFeatureScheduleElePct;

	@ApiModelProperty(value = "有剩余排期年审类型占比")
	private Map<Integer, PctItemVO> featureScheduleUseType;

	@ApiModelProperty(value = "无剩余排期年审类型占比")
	private Map<Integer, PctItemVO> notFeatureScheduleUseType;

	@ApiModelProperty(value = "从未排期电梯年审类型占比")
	private Map<Integer, PctItemVO> notPlanEleUseType;

	@ApiModelProperty(value = "有剩余排期合同类型占比")
	private Map<Integer, PctItemVO> featureScheduleMaintainStatus;

	@ApiModelProperty(value = "无剩余排期合同类型占比")
	private Map<Integer, PctItemVO> notFeatureScheduleMaintainStatus;

	public Long getPlanEleTotal() {
		if (this.planEleTotal == null) {
			this.planEleTotal = 0L;
		}
		return planEleTotal;
	}

	public Long getNotPlanEleTotal() {
		if (this.notPlanEleTotal == null) {
			this.notPlanEleTotal = 0L;
		}
		return notPlanEleTotal;
	}

	public Long getFeatureScheduleEleCount() {
		if (this.featureScheduleEleCount == null) {
			this.featureScheduleEleCount = 0L;
		}
		return featureScheduleEleCount;
	}

	public Long getNotFeatureScheduleEleCount() {
		if (this.notFeatureScheduleEleCount == null) {
			this.notFeatureScheduleEleCount = 0L;
		}
		return notFeatureScheduleEleCount;
	}

	public BigDecimal getFeatureScheduleElePct() {
		if (this.featureScheduleElePct == null) {
			return BigDecimal.ZERO;
		}
		return featureScheduleElePct.multiply(new BigDecimal(100)).setScale(1, BigDecimal.ROUND_HALF_UP);
	}

	public BigDecimal getNotFeatureScheduleElePct() {
		if (this.notFeatureScheduleElePct == null) {
			return BigDecimal.ZERO;
		}
		return notFeatureScheduleElePct.multiply(new BigDecimal(100)).setScale(1, BigDecimal.ROUND_HALF_UP);
	}
}
